Re: Multiple databases?

From: Turbo Fredriksson <turbo(at)bayour(dot)com>
To: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Multiple databases?
Date: 2017-09-15 09:28:17
Message-ID: F82247A7-1AE8-4812-96D5-0AC3E83E2437@bayour.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 15 Sep 2017, at 02:34, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:

> I thought RDS kept the endpoint the same when one of the replica's dies?

I’m not sure and I don’t know how to test this. I can’t just stop the master.
AWS refuses to if/when there’s replicas to it. I can “delete” it, but that won’t
do anything to any of the replicas that I have seen. No promotion and no
changing of endpoint address.

And from what I remember, the only thing the documentation say about
a crashed master is that “AWS will automatically promote one of the replicas
to new master”. It doesn’t say if the endpoint changes with it.

But considering that the DB instance name is part of the endpoint address,
I doubt it WILL change!

> The driver doesn't do load balancing.

Ok, thanx. So how does that work if I add multiple DB endpoints? It will
only use the first one, in a read/write capacity? What if that one stops
responding, will the driver then try the next endpoint?

Will the driver be “smart” enough to recognise that this is a read/only
DB and not do writes? Or will it try again with the next in line (third one)?

> Yes, it does know when it connects but if that situation changes it will not be able to figure it out

Ok, so as long as one uses non-persistent DB connection and open up
a connection every time it’s needed, this should “hopefully” work?

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Turbo Fredriksson 2017-09-15 09:31:05 Re: Multiple databases?
Previous Message Vladimir Sitnikov 2017-09-15 06:55:40 Re: Multiple databases?