Re: pgstat.c: send/EINTR issue - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: pgstat.c: send/EINTR issue
Date
Msg-id 20060802112950.GH29699@svana.org
Whole thread Raw
In response to pgstat.c: send/EINTR issue  ("Ilja Golshtein" <ilejn@yandex.ru>)
List 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@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: "Andy Dale"
Date:
Subject: Re: Performance/Issues with CMP and JBoss
Next
From: Richard Huxton
Date:
Subject: Re: Performance/Issues with CMP and JBoss