Skip to content

Commit 540f316

Browse files
committed
Blind attempt to fix pglz_maximum_compressed_size
Commit 11a078c triggered failures on big-endian machines, and the only plausible place for an issue seems to be that TOAST_COMPRESS_SIZE calls VARSIZE instead of VARSIZE_ANY. So try fixing that blindly. Discussion: https://www.postgresql.org/message-id/20191001131803.j6uin7nho7t6vxzy%40development
1 parent fa2fe04 commit 540f316

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/access/toast_internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ typedef struct toast_compress_header
3131
*/
3232
#define TOAST_COMPRESS_HDRSZ ((int32) sizeof(toast_compress_header))
3333
#define TOAST_COMPRESS_RAWSIZE(ptr) (((toast_compress_header *) (ptr))->rawsize)
34-
#define TOAST_COMPRESS_SIZE(ptr) ((int32) VARSIZE(ptr) - TOAST_COMPRESS_HDRSZ)
34+
#define TOAST_COMPRESS_SIZE(ptr) ((int32) VARSIZE_ANY(ptr) - TOAST_COMPRESS_HDRSZ)
3535
#define TOAST_COMPRESS_RAWDATA(ptr) \
3636
(((char *) (ptr)) + TOAST_COMPRESS_HDRSZ)
3737
#define TOAST_COMPRESS_SET_RAWSIZE(ptr, len) \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy