pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: jtv@xs4all.nl
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Getting results after networking error
Date: Tue, 09 Aug 2005 12:26:52 -0400
Message-ID: <16904.1123604812@sss.pgh.pa.us> (raw)
In-Reply-To: <4395.210.86.147.191.1123600604.squirrel@210.86.147.191>
References: <4395.210.86.147.191.1123600604.squirrel@210.86.147.191>

jtv@xs4all.nl writes:
> I sometimes issue multiple queries at once using semicolons, so one call
> returns multiple results.  Now let's say my network connection to the
> backend breaks and not all the results can be returned--I get a result
> with some error code (wish I knew which, but that's another story)
> followed by a NULL result to indicate that no more results are following,
> right?

> Now let's say that I issue my next query and the network connection
> recovers in the process.  I happily start retrieving results again, but
> are they only results for the new query, or do I go through the remaining
> results of the last query first?

I don't think there is a unique answer to that, without a whole lot of
assumptions about the nature of the failure and the behavior of the
network transport layer.  Did the backend see any send() failures?
Did the transport layer permanently lose any data already given to it,
or just delay transmission?

On the whole I think the odds of re-syncing successfully are pretty bad,
and you'd be best off to pull the plug and start a new connection if you
see any networking failure.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <16904.1123604812@sss.pgh.pa.us>
Permalink:  ../16904.1123604812@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16904.1123604812@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jtv@xs4all.nl
  Subject: Re: Getting results after networking error
  In-Reply-To: <16904.1123604812@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox