Re: test_shm_mq failing on anole (was: Sending out a request for more buildfarm animals?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dave Page <dave(dot)page(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, CM Team <cm(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, bernd(dot)helmle(at)credativ(dot)de
Subject: Re: test_shm_mq failing on anole (was: Sending out a request for more buildfarm animals?)
Date: 2014-09-29 23:09:27
Message-ID: 14175.1412032167@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-09-29 18:44:34 -0300, Alvaro Herrera wrote:
>> As far as I recall, the rationale for why this is acceptable is that the
>> whole of postmaster is run with signals blocked; they are only unblocked
>> during the sleeping select().

> Yea, I wrote that above :). Still seems remarkably fragile and
> unnecessarily complex. The whole thing would be much simpler and
> importantly easier to understand if everything would be done inside the
> mainloop and the handlers just would set a latch...

Actually, I rather doubt that it would be either simpler or easier to
understand. The reason to think about changing it, IMO, is the fear that
sooner or later we're going to file a bug against some platform's libc and
they're going to tell us to get lost because POSIX says that such-and-such
a library call isn't supported inside a signal handler.

> But I guess that'd be a bit of large change to something as central as
> postmaster's code..

Yeah. It's a bit scary to consider changing this just to head off a
hypothetical portability problem, especially of a class that we've not
*actually* tripped across in nigh twenty years. The closest thing that
I've seen to that is the valgrind bug we hit awhile back,
https://bugzilla.redhat.com/show_bug.cgi?id=1024162

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-09-29 23:45:29 Re: Escaping from blocked send() reprised.
Previous Message Tom Lane 2014-09-29 23:00:37 Re: Yet another abort-early plan disaster on 9.3