Re: pgstat.c: send/EINTR issue

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ilja Golshtein <ilejn(at)yandex(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgstat.c: send/EINTR issue
Date: 2006-08-02 11:29:50
Message-ID: 20060802112950.GH29699@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 02, 2006 at 02:57:59PM +0400, Ilja Golshtein wrote:
> Hello!
>
> I've came across recent change of
> postmaster/pgstat.c with comment
> regarding send/EINTR issue.
>
> Does it make sense to amend,
> for example, secure_write() in
> be_secure.c (part of libpq)
> in the same way?
> Am I right thinking it may
> fail during reloading configuration?
> Is it the only dangerous case?

The point is that EINTR is not supposed to happen, at all, in the
backend. It should only happen with non-blocking sockets (not used in
backend) or interruption by a signal (disabled in the backend). My
understanding of the EINTR change is that it's a windows issue, which
doesn't totally follow the above rules.

BTW, be_secure is used in the backend, fe-secure is used in libpq and
does support non-blocking and EINTR.

If it possible for the system to return EINTR in
secure_read/secure_write, then we also need to worry about it during
disk access and many other places.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-08-02 11:44:11 Re: Performance/Issues with CMP and JBoss
Previous Message Andy Dale 2006-08-02 11:09:17 Re: Performance/Issues with CMP and JBoss