Tom Lane wrote:
> 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?
Suggestion: Make the delay/reconnect optional with configurable
parameters for how many times to retry, how long to retry, etc.
I have an Apache mod-perl app already doing this reconnect logic, and I'm
very glad my app has control over those parameters.
Cheers,
Ed Loehr