agora inbox for [email protected]
help / color / mirror / Atom feedPostgreSQL Developer needed in San Diego
978+ messages / 3 participants
[nested] [flat]
* PostgreSQL Developer needed in San Diego
@ 2007-06-18 23:10 Perry, Lance <[email protected]>
2007-06-19 02:28 ` Re: PostgreSQL Developer needed in San Diego Jonah H. Harris <[email protected]>
0 siblings, 1 reply; 978+ messages in thread
From: Perry, Lance @ 2007-06-18 23:10 UTC (permalink / raw)
To: pgsql-hackers
We currently have a need for a PostgreSQL Developer to fill a permanent
requirement with our company here in San Diego. Details below. Please
contact Lance Perry at 858-550-1658 or [email protected] for further
info.
Title: SQL Server/PostgreSQL Database Developer
This position involves creating tables, views, functions and stored
procedures in SQL Server and PostgreSQL to support front end OLTP and
reporting applications. The ideal developer will have thorough knowledge
of Transact-SQL, and extensive experience with complex stored
procedures, code optimization, and index tuning.
Ideal candidate will have the following qualifications:
* Prefer 5 years of database development with SQL Server 7.0/2000/2005
and Enterprise Manager/Query Analyzer
* Significant background in creating complex stored procedures and SQL
scripts with Transact-SQL
* Significant understanding of PostgreSQL
* Understanding of database normalization concepts
* Some experience in logical and physical database design and
implementation
* Prior experience working in a project oriented environment and meeting
deadlines under tight time constraints
* Strong analytical skills
* Capable of working independently with minimal supervision
We are proud to be an EEO/AA employer M/F/D/V. We maintain a drug-free
workplace and perform pre-employment substance abuse testing.
Lance Perry
Technology Recruiter
San Diego, CA
858.550.1658 direct
858.552.9071 fax
[email protected] <mailto:[email protected]>
www.kforce.com <http://www.kforce.com/;
Great People = Great ResultsSM
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and/or privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
^ permalink raw reply [nested|flat] 978+ messages in thread
* Re: PostgreSQL Developer needed in San Diego
2007-06-18 23:10 PostgreSQL Developer needed in San Diego Perry, Lance <[email protected]>
@ 2007-06-19 02:28 ` Jonah H. Harris <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Jonah H. Harris @ 2007-06-19 02:28 UTC (permalink / raw)
To: Perry, Lance <[email protected]>; +Cc: pgsql-hackers
On 6/18/07, Perry, Lance <[email protected]> wrote:
> We currently have a need for a PostgreSQL Developer to fill a permanent
> requirement with our company here in San Diego.
In the future, please post to pgsql-jobs. Thank you.
--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 3rd Floor | [email protected]
Iselin, New Jersey 08830 | http://www.enterprisedb.com/
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: text/plain
Content-Disposition: attachment;
filename=v41-0003-Add-CONCURRENTLY-option-to-REPACK-command.patch
^ permalink raw reply [nested|flat] 978+ messages in thread
* [PATCH 2/5] Add va_header field to the varattrib_4b union.
@ 2026-03-11 13:53 Antonin Houska <[email protected]>
0 siblings, 0 replies; 978+ messages in thread
From: Antonin Houska @ 2026-03-11 13:53 UTC (permalink / raw)
Since VARSIZE_ANY() may call VARSIZE_4B(), it's possible that the compiler
(when invoked with -Warray-bounds) complains if the argument of VARSIZE_ANY()
is actually smaller than what VARSIZE_4B() expects. With the new field,
VARSIZE_4B() can check the size w/o dereferencing varattrib_4b pointer.
The problem does not exist in the tree at the moment since the current users
of VARSIZE_ANY() pass a pointer to a dynamically allocated memory, so the
compiler has no idea about the memory available. However, in an upcoming
patch, it makes sense to pass a pointer to a local variable of "varlena"
type. In such a case, the compiler warning might appear because
sizeof(varlena) is lower than sizeof(varattrib_4b).
---
src/include/varatt.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/include/varatt.h b/src/include/varatt.h
index 000bdf33b92..c54d5160c22 100644
--- a/src/include/varatt.h
+++ b/src/include/varatt.h
@@ -137,6 +137,10 @@ typedef union
* compression method; see va_extinfo */
char va_data[FLEXIBLE_ARRAY_MEMBER]; /* Compressed data */
} va_compressed;
+ uint32 va_header; /* Without this, compiler might raise warning
+ * (-Warray-bounds) if the argument of
+ * VARSIZE_ANY() is smaller than
+ * varattrib_4b */
} varattrib_4b;
typedef struct
@@ -207,7 +211,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- (((const varattrib_4b *) (PTR))->va_4byte.va_header & 0x3FFFFFFF)
+ (*((const uint32 *) (PTR)) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
(((const varattrib_1b *) (PTR))->va_header & 0x7F)
#define VARTAG_1B_E(PTR) \
@@ -240,7 +244,7 @@ typedef struct
/* VARSIZE_4B() should only be used on known-aligned data */
#define VARSIZE_4B(PTR) \
- ((((const varattrib_4b *) (PTR))->va_4byte.va_header >> 2) & 0x3FFFFFFF)
+ ((*((const uint32 *) (PTR)) >> 2) & 0x3FFFFFFF)
#define VARSIZE_1B(PTR) \
((((const varattrib_1b *) (PTR))->va_header >> 1) & 0x7F)
#define VARTAG_1B_E(PTR) \
--
2.47.3
--=-=-=
Content-Type: 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 --
2007-06-18 23:10 PostgreSQL Developer needed in San Diego Perry, Lance <[email protected]>
2007-06-19 02:28 ` Jonah H. Harris <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin Houska <[email protected]>
2026-03-11 13:53 [PATCH 2/5] Add va_header field to the varattrib_4b union. Antonin 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