natan:
> Hi
> I try to run "backup" transport maps like:
> 
> smtpd_sender_login_maps =
> #first-main database
>     proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
> #second-backup
>     proxy:mysql:/etc/postfix/mysql_sender_login_maps-backup.cf
> 
> Both databases are the same because they are synchronized (cluser 
> gallera) but the first is in other machines and second in local 
> (database ~150MB)
> 
> I am thinking of such a solution as if there was a problem with the 
> connection to the main database.
> 
> does this solution make sense?

Postfix does not know that the two databases are identical, and
therefore it must assume that the databases can return different
results. When databases can produce different results, skipping
a database can produce an incorrect result.

For correctness reasons, Postfix must stop when a database fails
to produce a result, and it must not skip to the next database.

> Or maby use localhaproxy ?

Yes, if you have haproxy tests that validate the database response,
i.e. the database produces the expected answer for a specific query.
Merely making a TCP connection is not sufficient.

        Wietse

Reply via email to