| From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-committers(at)postgresql(dot)org |
| Subject: | Re: pgsql: Fix unaligned accesses in DecodeUpdate(). |
| Date: | 2014-05-17 20:23:44 |
| Message-ID: | 20140517202344.GA4484@awork2.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Hi,
On 2014-05-17 19:54:05 +0000, Tom Lane wrote:
> 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.
Hm. It's too bad it's hard to see these cases on x86. I wondered before
why valgrind doesn't catch those...
Some mozilla devs seem to have whipped the feature up quickly enough:
https://bugzilla.mozilla.org/show_bug.cgi?id=476122
Too bad it's not been integrated.
> 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.
Yes, that's impossible. It'd be a bit pointless to decode an update
where the new value isn't available. Would kinda hurt while
replicability...
Thanks for fixing.
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-05-17 21:57:59 | pgsql: Fix a bunch of functions that were declared static then defined |
| Previous Message | Tom Lane | 2014-05-17 19:54:05 | pgsql: Fix unaligned accesses in DecodeUpdate(). |