Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations
Date
Msg-id 31753.1406397518@sss.pgh.pa.us
Whole thread Raw
In response to Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> Wouldn't it be better to move the catchup interrupt processing out of
> the signal handler? For normal backends we only enable when reading from
> the client and DoingCommandRead is set. How about setting a variable in
> the signal handler and doing the actual catchup processing after the
> recv() returned EINTR?

Only it won't.  See SA_RESTART.  I think turning that off is a nonstarter,
as per previous discussions.

> That'd require either renegging on SA_RESTART or
> using WaitLatchOrSocket() and nonblocking send/recv.

Yeah, I was wondering about using WaitLatchOrSocket for client I/O too.
We already have a hook that lets us do the actual recv even when using
OpenSSL, and in principle that function could do interrupt-service-like
functions if it got kicked off the recv().

Anything in this line is going to be a bigger change than I'd want to
back-patch, though.  Are we OK with not fixing the problem in the back
branches?  Given the shortage of field complaints, that might be all
right.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: parametric block size?
Next
From: Tom Lane
Date:
Subject: Re: building pdfs