diff options
| author | Peter Eisentraut | 2016-12-21 17:00:00 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2016-12-21 14:06:49 +0000 |
| commit | f3b421da5f4addc95812b9db05a24972b8fd9739 (patch) | |
| tree | 89a189a33e6eb712353b5f6397dd728a54d2d9e9 /src/include | |
| parent | ecbdc4c555f43b1ac284c734752b00c2ea6f277b (diff) | |
Reorder pg_sequence columns to avoid alignment issue
On AIX, doubles are aligned at 4 bytes, but int64 is aligned at 8 bytes.
Our code assumes that doubles have alignment that can also be applied to
int64, but that fails in this case. One effect is that
heap_form_tuple() writes tuples in a different layout than
Form_pg_sequence expects.
Rather than rewrite the whole alignment code, work around the issue by
reordering the columns in pg_sequence so that the first int64 column
naturally comes out at an 8-byte boundary.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
| -rw-r--r-- | src/include/catalog/pg_sequence.h | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 5779f0d617..7d15189ead 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 201612201 +#define CATALOG_VERSION_NO 201612202 #endif diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h index 3bcda6bef1..350b286e45 100644 --- a/src/include/catalog/pg_sequence.h +++ b/src/include/catalog/pg_sequence.h @@ -8,23 +8,23 @@ CATALOG(pg_sequence,2224) BKI_WITHOUT_OIDS { Oid seqrelid; + bool seqcycle; int64 seqstart; int64 seqincrement; int64 seqmax; int64 seqmin; int64 seqcache; - bool seqcycle; } FormData_pg_sequence; typedef FormData_pg_sequence *Form_pg_sequence; #define Natts_pg_sequence 7 #define Anum_pg_sequence_seqrelid 1 -#define Anum_pg_sequence_seqstart 2 -#define Anum_pg_sequence_seqincrement 3 -#define Anum_pg_sequence_seqmax 4 -#define Anum_pg_sequence_seqmin 5 -#define Anum_pg_sequence_seqcache 6 -#define Anum_pg_sequence_seqcycle 7 +#define Anum_pg_sequence_seqcycle 2 +#define Anum_pg_sequence_seqstart 3 +#define Anum_pg_sequence_seqincrement 4 +#define Anum_pg_sequence_seqmax 5 +#define Anum_pg_sequence_seqmin 6 +#define Anum_pg_sequence_seqcache 7 #endif /* PG_SEQUENCE_H */ |
