diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-10-01 16:53:04 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2019-10-01 16:53:04 +0200 |
commit | 540f31680913b4e11f2caa40cafeca269cfcb22f (patch) | |
tree | e9e4e2df4cc9e140cc0a9618c0d964c58fee2b35 /src | |
parent | fa2fe04bf1d4d31e099808745974964f84eb4521 (diff) | |
download | postgresql-540f31680913b4e11f2caa40cafeca269cfcb22f.tar.gz postgresql-540f31680913b4e11f2caa40cafeca269cfcb22f.zip |
Blind attempt to fix pglz_maximum_compressed_size
Commit 11a078cf87 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
Diffstat (limited to 'src')
-rw-r--r-- | src/include/access/toast_internals.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/access/toast_internals.h b/src/include/access/toast_internals.h index b8703d8c94e..9bd1c97771a 100644 --- a/src/include/access/toast_internals.h +++ b/src/include/access/toast_internals.h @@ -31,7 +31,7 @@ typedef struct toast_compress_header */ #define TOAST_COMPRESS_HDRSZ ((int32) sizeof(toast_compress_header)) #define TOAST_COMPRESS_RAWSIZE(ptr) (((toast_compress_header *) (ptr))->rawsize) -#define TOAST_COMPRESS_SIZE(ptr) ((int32) VARSIZE(ptr) - TOAST_COMPRESS_HDRSZ) +#define TOAST_COMPRESS_SIZE(ptr) ((int32) VARSIZE_ANY(ptr) - TOAST_COMPRESS_HDRSZ) #define TOAST_COMPRESS_RAWDATA(ptr) \ (((char *) (ptr)) + TOAST_COMPRESS_HDRSZ) #define TOAST_COMPRESS_SET_RAWSIZE(ptr, len) \ |