Re: [HACKERS] dubious improvement in new psql

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] dubious improvement in new psql
Date: 2000-01-02 03:09:38
Message-ID: 3.0.1.32.20000101190938.00ed45e0@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 01:48 PM 1/1/00 -0500, Tom Lane wrote:

>I said no such thing!
>
>You certainly *can* reconnect, although under WAL it will take a delay
>(or better, a retry loop).
>
>However, I think reconnection has to be integrated into the
>application's logic at a level where you can have some idea of what
>needs to be redone after reconnecting. That's why I objected to having
>psql do it. If psql's only going to do it interactively then I guess
>it's safe enough, though.

OK, my misunderstanding. I couldn't understand why psql in interactive
mode should be a problem and took your comments in a more general context.

>
>Question for discussion: when the WAL postmaster is running a database
>start or restart, perhaps it should simply delay processing of new
>connection requests until the DB is ready, instead of rejecting them
>immediately? That would eliminate the need for retry loops in
>applications, and thereby avoid wasted retry processing on both sides.
>On the other hand, I can see where an unexpected multi-second delay to
>connect might be bad news, too. Comments?

I've been thinking about this one, actually...

Perhaps letting the caller decide in some manner? In my driver environment
I'm not really supposed to call sleep or the like and a busy-wait for the
connection(s) to be rebuilt probably isn't the best thing to do, since the
postmaster is going to be hard at work straightening out things with the
WAL.

- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Olivier PRENANT 2000-01-02 14:15:47 Date calc bug
Previous Message Bruce Momjian 2000-01-02 02:10:32 Re: [HACKERS] pgsql y2k bug?