pgsql: Reorder pg_sequence columns to avoid alignment issue

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Reorder pg_sequence columns to avoid alignment issue
Date: 2016-12-21 14:11:22
Message-ID: E1cJhc2-0005GZ-GJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f3b421da5f4addc95812b9db05a24972b8fd9739

Modified Files
--------------
doc/src/sgml/catalogs.sgml | 14 +++++++-------
src/backend/commands/sequence.c | 4 ++--
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_sequence.h | 14 +++++++-------
4 files changed, 17 insertions(+), 17 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-21 14:54:12 pgsql: Refactor merge path generation code.
Previous Message Pavel Stehule 2016-12-21 13:00:44 Re: [COMMITTERS] pgsql: Simplify LWLock tranche machinery by removing array_base/array_s