[Pgpool-general] Replication and Failover

Gary Fu gfu at sigmaspace.com
Tue Oct 5 13:33:18 UTC 2010


  On 10/04/10 18:56, Tatsuo Ishii wrote:
>> I'm running pgpool2 3.0 with replication mode. I just noticed that
>> when
>> the pgpool failover (due to mismatch error) is done by shutting down
>> the
>> secondary db, my application failed due to the lost of connection.
>> The documentation mention that when the failover is performed,
>> pgpool kills all its child processes and starts new child processes
>> for
>> new connections from the clients.  Does this mean that my application
>> has to make the new connection when the failover happens ?
> Yes.
>
>> If so,
>> the question is how does my application know there is a failover ?
> In this case libpq/your_favorite_driver returns error "server closed
> the connection unexpectedly This probably means the server
> terminated abnormally before or while processing the request."
> --

Is there a way to just disable the secondary db when the mismatch error
happens without failover, so that my application can keep working with
the primary db without making a new connection ?

I did tested (as far as I can remember) before with old pgpool2 version,
that when I shut down one of the db, my application kept working without
lost connection error.  What's the difference between this case and the
faileover case ?

Thanks,
Gary


More information about the Pgpool-general mailing list