postgresql/src
Amit Kapila 79b716cfb7 Reorder subskiplsn in pg_subscription to avoid alignment issues.
The column 'subskiplsn' uses TYPALIGN_DOUBLE (which has 4 bytes alignment
on AIX) for storage. But the C Struct (Form_pg_subscription) has 8-byte
alignment for this field, so retrieving it from storage causes an
unaligned read.

To fix this, we rearranged the 'subskiplsn' column in the catalog so that
it naturally comes at an 8-byte boundary.

We have fixed a similar problem in commit f3b421da5f. This patch adds a
test to avoid a similar mistake in the future.

Reported-by: Noah Misch
Diagnosed-by: Noah Misch, Masahiko Sawada, Amit Kapila
Author: Masahiko Sawada
Reviewed-by: Noah Misch, Amit Kapila
Discussion: https://postgr.es/m/20220401074423.GC3682158@rfd.leadboat.com
	    https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xJfUVihNZDA@mail.gmail.com
2022-04-07 09:39:25 +05:30
..
backend Reorder subskiplsn in pg_subscription to avoid alignment issues. 2022-04-07 09:39:25 +05:30
bin Add option --config-file to pg_rewind 2022-04-07 08:51:49 +09:00
common Fix possible NULL-pointer-deference in backup_compression.c. 2022-03-30 15:53:08 -04:00
fe_utils Allow pgbench to retry in some cases. 2022-03-23 19:05:45 +09:00
include Reorder subskiplsn in pg_subscription to avoid alignment issues. 2022-04-07 09:39:25 +05:30
interfaces libpq: Fix pkg-config without OpenSSL 2022-04-01 17:15:24 +02:00
makefiles Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
pl Keep plpgsql.h C++-clean. 2022-03-31 18:29:10 -04:00
port Simplify coding around path_contains_parent_reference(). 2022-01-31 13:53:38 -05:00
template Refactor DLSUFFIX handling 2022-03-25 08:56:02 +01:00
test Reorder subskiplsn in pg_subscription to avoid alignment issues. 2022-04-07 09:39:25 +05:30
timezone Update copyright for 2022 2022-01-07 19:04:57 -05:00
tools pgstat: scaffolding for transactional stats creation / drop. 2022-04-06 18:27:52 -07:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Update Unicode data to CLDR 41 2022-04-06 08:17:33 +02:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:27:59 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00