Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Re-run query on automatic reconnect


  • From: "Jim C. Nasby" <jnasby(at)pervasive(dot)com>
  • To: Michael Fuhr <mike(at)fuhr(dot)org>
  • Cc: pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: Re-run query on automatic reconnect
  • Date: Tue, 27 Sep 2005 17:36:11 -0500
  • Message-id: <20050927223611(dot)GB30974(at)pervasive(dot)com>

On Mon, Sep 26, 2005 at 02:52:02PM -0600, Michael Fuhr wrote:
> On Mon, Sep 26, 2005 at 01:23:03PM -0500, Jim C. Nasby wrote:
> > Is there any particular reason why psql doesn't re-run a query that
> > failed due to disconnect from the server after re-connecting? I've
> > thought maybe it's because it might somehow be dangerous, but I can't
> > think of any case where that's actually true.
> 
> What if the query itself resulted in the disconnect by causing the
> backend to crash?  Re-running such a query automatically would be
> a bad idea.  Or did I misunderstand what you're asking?

The case I was thinking of was...

psql> run some command...

psql returns from call

user does something else; meanwhile, server forced shutdown/crash

user comes back, tries to run some query and gets automatic reconnect

In any case, Tom brought up a bunch of cases where this would be a bad
idea, so my question's answored.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby(at)pervasive(dot)com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group