Re: Portability issues in shm_mq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Portability issues in shm_mq
Date: 2014-03-18 16:21:28
Message-ID: 12729.1395159688@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> First, can you retest this with the latest code?

> Yeah, on it now.

Early returns not good:

*** /Users/buildfarm/bf-data/HEAD/pgsql.93630/contrib/test_shm_mq/expected/test_shm_mq.out Tue Mar 18 12:00:18 2014
--- /Users/buildfarm/bf-data/HEAD/pgsql.93630/contrib/test_shm_mq/results/test_shm_mq.out Tue Mar 18 12:17:04 2014
***************
*** 5,18 ****
-- internal sanity tests fail.
--
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,400)), 10000, 1);
! test_shm_mq
! -------------
!
! (1 row)
!
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,270000)), 200, 3);
! test_shm_mq_pipelined
! -----------------------
!
! (1 row)
!
--- 5,12 ----
-- internal sanity tests fail.
--
SELECT test_shm_mq(32768, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,400)), 10000, 1);
! ERROR: message corrupted
! DETAIL: The original message was 400 bytes but the final message is 7492059346764176 bytes.
SELECT test_shm_mq_pipelined(16384, (select string_agg(chr(32+(random()*96)::int), '') from generate_series(1,270000)), 200, 3);
! ERROR: message corrupted
! DETAIL: The original message was 270000 bytes but the final message is 7492059347033776 bytes.

This is C locale on a 32-bit machine, so you'll likely be seeing the same
complaint in already-online buildfarm members.

Note that size_t is definitely not int64 on this machine, so it looks to
me like your int64-ectomy was incomplete. Those message lengths should
be impossible no matter what on this hardware.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-03-18 16:28:01 Re: Patch: show relation and tuple infos of a lock to acquire
Previous Message David Johnston 2014-03-18 16:18:14 Re: Minimum supported version of Python?