Re: Synchronous replication: sleeping

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronous replication: sleeping
Date: 2008-12-08 13:36:27
Message-ID: 23532.1228743387@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> On Mon, Dec 08, 2008 at 01:12:39PM +0200, Heikki Linnakangas wrote:
>> BTW, on what platforms signal doesn't interrupt sleep?

> In theory, none.

In practice, they exist. In particular I can demonstrate the issue
on HPUX 10.20. I also dispute your claim that the behavior is
forbidden by standards, For example, the Single Unix Spec
http://www.opengroup.org/onlinepubs/007908799/xsh/select.html
saith

If SA_RESTART has been set for the interrupting signal, it is
implementation-dependent whether select() restarts or returns with
[EINTR].

and since we set SA_RESTART for most everything, we are exposed to the
implementation dependency.

I complained about this previously, but nothing came of it:
http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-12-08 14:04:51 Re: Sync Rep: First Thoughts on Code
Previous Message Tom Lane 2008-12-08 13:18:56 Re: Regexps vs. locale