Redundant Database, Pgsql ?

Marc Marc at f1-outsourcing.eu
Wed Feb 22 11:08:01 UTC 2023


I don't even get what the advatages are of doing this with sql. If you use local replicated ldap and use local credential caching then your master ldap can go down without issues, even the local caching handle some local slapd issues. 
I guess the local caching is also faster. Afaik were databases not designed for this purpose and a better fit is ldap.

> 
> If I understand open source Postgres correctly, though, this setup
> basically requires that the application be read-only, or at least be
> intelligent enough not to attempt to write to a host if it has failed
> over to it, right? Don't you have to have human intervention to actually
> fail the master / primary over for write purposes?
> 
> Sent with Proton Mail secure email.
> 
> ------- Original Message -------
> On Tuesday, February 21st, 2023 at 10:28 PM, Marcus Jodorf
> <bofh at killfile.de> wrote:
> 
> 
> > On 2/21/23 18:04, Lars Schotte wrote:
> >
> 
> > > Yes, that looks nice, I am going to try that too.
> > >
> 
> > > Because every other option is based on some other software,
> > > like relayd or nginx, it is all possible, but adds complexity.
> > >
> 
> > > The best would be to have it inside connection string.
> >
> 
> >
> 
> > /etc/dovecot/dovecot-sql.conf.ext:
> >
> 
> > ...
> > connect= host=host1 host=host2 dbname=<db> user=<user> password=<pwd>
> >
> 
> >
> 
> >
> 
> > I'm using that since pretty much 2006 - if I'm not mistaken - on my
> > little servers. Simply works.
> >
> 
> > If one server is not reachable you just get an error log entry in
> > mail.err that connect failed to the database that is down.
> > But that is all - dovecot keeps working as normal.
> >
> 
> > BTW: Same with postfix. Simply list an additional fallback and it just
> > works.
> >
> 
> > Best,
> >
> 
> > Marcus


More information about the dovecot mailing list