diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-01 19:26:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-03-01 19:26:22 +0000 |
commit | d50e256b67470555440afba2c9d1c664f0a6387f (patch) | |
tree | 4e9042bc105902e1404715458441cd930d6d02ce /src | |
parent | e04fa58dcdf59e480db4a65be3d731d45a99fa3d (diff) | |
download | postgresql-d50e256b67470555440afba2c9d1c664f0a6387f.tar.gz postgresql-d50e256b67470555440afba2c9d1c664f0a6387f.zip |
Fix another place that was assuming that a local variable declared as
"struct varlena" would be at least word-aligned. Per buildfarm results
from gypsy_moth. I did a little bit of trawling for other instances of
this coding pattern, and didn't find any; but if we turn up any more
of them I think we'd better revert the "char [4]" patch and find another
way of making tuptoaster.c alignment-safe.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/large_object/inv_api.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 3cc2864ea72..95ed68d1bae 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -24,7 +24,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.127 2008/01/01 19:45:52 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.128 2008/03/01 19:26:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -516,7 +516,8 @@ inv_write(LargeObjectDesc *obj_desc, const char *buf, int nbytes) struct { bytea hdr; - char data[LOBLKSIZE]; + char data[LOBLKSIZE]; /* make struct big enough */ + int32 align_it; /* ensure struct is aligned well enough */ } workbuf; char *workb = VARDATA(&workbuf.hdr); HeapTuple newtup; @@ -707,7 +708,8 @@ inv_truncate(LargeObjectDesc *obj_desc, int len) struct { bytea hdr; - char data[LOBLKSIZE]; + char data[LOBLKSIZE]; /* make struct big enough */ + int32 align_it; /* ensure struct is aligned well enough */ } workbuf; char *workb = VARDATA(&workbuf.hdr); HeapTuple newtup; |