pgsql: Fix wrong allocation size in c8f621c43.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix wrong allocation size in c8f621c43.
Date: 2016-03-07 00:30:08
Message-ID: E1acj3o-0005mC-0O@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix wrong allocation size in c8f621c43.

In c8f621c43 I forgot to account for MAXALIGN when allocating a new
tuplebuf in ReorderBufferGetTupleBuf(). That happens to currently not
cause active problems on a number of platforms because the affected
pointer is already aligned, but others, like ppc and hppa, trigger this
in the regression test, due to a debug memset clearing memory.

Fix that.

Backpatch: 9.4, like the previous commit.

Branch
------
master

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

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2016-03-07 00:30:09 pgsql: Fix wrong allocation size in c8f621c43.
Previous Message Tom Lane 2016-03-07 00:21:26 pgsql: Fix not-terribly-safe coding in NIImportOOAffixes() and NIImport