Re: Hot Standby conflict resolution handling - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hot Standby conflict resolution handling
Date
Msg-id 29354.1358404711@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hot Standby conflict resolution handling  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Responses Re: Hot Standby conflict resolution handling
Re: Hot Standby conflict resolution handling
List pgsql-hackers
Abhijit Menon-Sen <ams@2ndQuadrant.com> writes:
> Sorry for nitpicking, but "we can't long jumps" made me cringe.

Agreed :-(

> Here's a slightly more condensed version:

I find this still not quite right, because where it's placed, it applies
to both the DoingCommandRead and !DoingCommandRead branches of the
if/else statement.  The wording would be okay if placed inside the first
if branch, but I think visually that would look ugly.  I'm inclined to
suggest wording it like
* If we're in DoingCommandRead state, we can't use ereport(ERROR),* because any longjmp would risk interrupting OpenSSL
operations*and thus confusing that library and/or violating wire protocol.
 

plus your second para as-is.

But having said that ... are we sure this code is not actually broken?
ISTM that if we dare not interrupt for fear of confusing OpenSSL, we
cannot safely attempt to send an error message to the client either;
but ereport(FATAL) will try exactly that.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CF3+4
Next
From: Craig Ringer
Date:
Subject: Re: CF3+4