pgsql: Fix unaligned accesses in DecodeUpdate().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix unaligned accesses in DecodeUpdate().
Date: 2014-05-17 19:54:05
Message-ID: E1WlkgH-0000Vb-Hk@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix unaligned accesses in DecodeUpdate().

The xl_heap_header_len structures in an XLOG_HEAP_UPDATE record aren't
necessarily aligned adequately. The regular replay function for these
records is aware of that, but decode.c didn't get the memo. I'm not
sure why the buildfarm failed to catch this; the test_decoding test
certainly blows up real good on my old HPPA box.

Also, I'm pretty sure that the address arithmetic was wrong for the
case of XLOG_HEAP_CONTAINS_OLD and not XLOG_HEAP_CONTAINS_NEW_TUPLE,
though this apparently can't happen when logical decoding is active.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6c42b2b10af3f717030966b9f05867f3e065becc

Modified Files
--------------
src/backend/replication/logical/decode.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-05-17 20:23:44 Re: pgsql: Fix unaligned accesses in DecodeUpdate().
Previous Message Heikki Linnakangas 2014-05-17 10:55:23 pgsql: Update README, we don't do post-recovery cleanup actions anymore