postgresql/src
Andres Freund 6647248e37 Don't allow immediate interrupts during authentication anymore.
We used to handle authentication_timeout by setting
ImmediateInterruptOK to true during large parts of the authentication
phase of a new connection.  While that happens to work acceptably in
practice, it's not particularly nice and has ugly corner cases.

Previous commits converted the FE/BE communication to use latches and
implemented support for interrupt handling during both
send/recv. Building on top of that work we can get rid of
ImmediateInterruptOK during authentication, by immediately treating
timeouts during authentication as a reason to die. As die interrupts
are handled immediately during client communication that provides a
sensibly quick reaction time to authentication timeout.

Additionally add a few CHECK_FOR_INTERRUPTS() to some more complex
authentication methods. More could be added, but this already should
provides a reasonable coverage.

While it this overall increases the maximum time till a timeout is
reacted to, it greatly reduces complexity and increases
reliability. That seems like a overall win. If the increase proves to
be noticeable we can deal with those cases by moving to nonblocking
network code and add interrupt checking there.

Reviewed-By: Heikki Linnakangas
2015-02-03 22:54:48 +01:00
..
backend Don't allow immediate interrupts during authentication anymore. 2015-02-03 22:54:48 +01:00
bin Add API functions to libpq to interrogate SSL related stuff. 2015-02-03 19:57:52 +02:00
common Fix libpq's behavior when /etc/passwd isn't readable. 2015-01-11 12:35:44 -05:00
include Remove unused "m" field in LSEG. 2015-02-03 16:53:32 -05:00
interfaces Add API functions to libpq to interrogate SSL related stuff. 2015-02-03 19:57:52 +02:00
makefiles Revert haphazard pgxs makefile changes 2014-12-04 08:07:59 -05:00
pl Translation updates 2015-02-01 23:23:40 -05:00
port port/snprintf(): fix overflow and do padding 2015-02-02 10:00:45 -05:00
template Remove duplicate specification of -Ae for HP-UX C compiler. 2015-01-13 22:52:11 -05:00
test Remove unused "m" field in LSEG. 2015-02-03 16:53:32 -05:00
timezone Update time zone data files to tzdata release 2015a. 2015-01-30 22:45:44 -05:00
tools tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
tutorial Update copyright for 2015 2015-01-06 11:43:47 -05:00
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in Fix installcheck case for tap tests 2014-12-24 10:31:36 -05:00
Makefile.shlib Install shared libraries also in bin on cygwin, mingw 2015-01-18 22:36:40 -05:00
nls-global.mk
win32.mak