From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix logical_decoding_timelines test crashes
Date: Fri, 01 Apr 2016 19:48:10 +0000
Message-ID: <E1am53C-0000D8-Vo@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix logical_decoding_timelines test crashes
In the test_slot_timelines test module, we were abusing passing NULL
values which was received as zeroes in x86, but this breaks in ARM
(buildfarm member hamster) by crashing instead. Fix the breakage by
marking these functions as STRICT; the InvalidXid value that was
previously implicit in NULL values (on x86 at least) can now be passed
as 0. Failing to follow the fmgr protocol to check for NULLs beforehand
was causing ARM to fail, as evidenced by segmentation faults in
buildfarm member hamster.
In order to use the new functionality in the test script, use COALESCE
in the right spot to avoid forwarding NULL values.
This was diagnosed from the hamster crash by Craig Ringer, who also
proposed a different patch (checking for NULL values explicitely in the
C function code, and keeping the non-strictness in the C functions).
I decided to go with this approach instead.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/82c83b337202fa0f5b235bdfaeb992a5cee40ed5
Modified Files
--------------
.../test_slot_timelines/expected/load_extension.out | 2 +-
.../modules/test_slot_timelines/sql/load_extension.sql | 2 +-
.../test_slot_timelines/test_slot_timelines--1.0.sql | 8 ++++----
.../modules/test_slot_timelines/test_slot_timelines.c | 6 +++---
src/test/recovery/t/006_logical_decoding_timelines.pl | 17 ++++++++++-------
5 files changed, 19 insertions(+), 16 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Fix logical_decoding_timelines test crashes
In-Reply-To: <E1am53C-0000D8-Vo@gemulon.postgresql.org>
References: <E1am53C-0000D8-Vo@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox