Re: Client failure allows backed to continue

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Client failure allows backed to continue
Date: 2003-01-28 04:24:55
Message-ID: 200301280424.h0S4Otp07191@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Well, setting query_cancel then seems like a logical solution because it
will exit at a reasonable point, hopefully. Right now we have
statement_timeout and that exits at a give time, but I suppose it
doesn't exit while data is transfering, so it may be different.

---------------------------------------------------------------------------

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Well, if we get an I/O error, I can't imagine why we would continue
> > doing anything --- are any of those recoverable?
>
> Well, that's what's not clear --- it's hard to tell if a write failure
> is a hard error or just transient. If we make like elog(ERROR),
> returning to the main loop, and then a read from the client *doesn't*
> fail, we'll try to continue ... but we've just screwed the pooch,
> because we have not sent a complete message and therefore certainly have
> messed up frontend/backend synchronization. I have no idea whether it's
> really possible to recover from this situation or not, but that approach
> surely won't work.
>
> If you want to take a kamikaze any-comm-error-means-we're-dead approach,
> you might think about elog(FATAL). But that tries to send a message to
> the client. Instant infinite loop, if the error is hard.
>
> Complaints to the postmaster log, and abort at the next safe place
> (*not* partway through message output) seem like the way to go to me.
>
> > Do we need a separate error type for I/O messages?
>
> Uh ... see COMMERROR.
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-28 04:49:27 Re: SET NULL on NOT NULL field
Previous Message Tom Lane 2003-01-28 04:17:36 Re: Client failure allows backed to continue